home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 263_02 / window.c < prev    next >
Text File  |  1990-02-13  |  858b  |  31 lines

  1. #include <stdio.h>
  2. #include <c_wndw.h>
  3.  
  4. /*
  5. *    Copyright 1989, Marietta Systems, Inc.
  6. *    All rights reserved
  7. */
  8.  
  9. /*
  10. *    This program shows the creation and removal of overlapping windows.
  11. *    A short delay is inserted between each window made and removed,
  12. *    otherwise the action will be too quick to see.
  13. */
  14.  
  15. void main ()
  16. {
  17.      int  x, y; /* (x,y) forms the coordinates of the top left corner */
  18.      clr_scrn ("Test of windows");
  19. /* create overlapping windows until the screen is full */
  20.      for (x = y = 4 ; x + 6 < 25 ; x += 3, y += 10 )
  21.      {
  22.           mk_wndw (x, y, x + 6, y + 16, "Test window");
  23.           display (" hello world ", 1, 1, alt_high);
  24.           idleloop (10); /* 18 clock ticks to the second */
  25.      }
  26. /* Remove the windows one at a time */
  27.      while (rm_wndw() > 0) idleloop (10);
  28. /* End the program */
  29.      goodbye (0);
  30. }
  31.